package com.geely.design.pattern.behavioral.command;

public class Test {
    public static void main(String[] args) {
        CourseVideo courseVideo = new CourseVideo("java设计模式");
        OpenCourseVideoCommand openCommand = new OpenCourseVideoCommand(courseVideo);
        CloseCourseVideoCommand closeCommand = new CloseCourseVideoCommand(courseVideo);

        Staff staff = new Staff();
        staff.addCommand(openCommand);
        staff.addCommand(closeCommand);
        staff.addCommand(openCommand);

        staff.execute();
    }
}
